Macromedia Flex Article

Learning Flex Basics (Part 1): Creating Your First Flex Application


Table of Contents

  1. Introduction
  2. A Brief Overview of Macromedia Flex
  3. Building the Application
  4. Create the Application Object
  5. Add a Panel for the Application Layout
  6. Add a Label for the View Header
  7. Add an Array of Objects to Define the Coffee Blends
  8. Add a ComboBox to Display the Coffee Blends
  9. Add a Text Control to Display the Description
  10. Add a Button to Add a Coffee Blend to the Shopping Cart
  11. Add a List Control for the Shopping Cart
  12. Add a Script to Handle the Button Click Event
  13. Complete Code Listing for firstapp.mxml
  14. Where to Go From Here

Add a Panel for the Application Layout

You generally place the visual components of your Flex application inside containers, which provide bounding boxes for text, controls, images, and other media elements. Here, you will use a container called Panel, which will provide the overall visual wrapper for most applications. You will also use the title attribute of Panel, which provides title text that will display in a title bar that is automatically included at the top of the panel.

  1. Inside the Application block, add a Panel block with the title attribute equal to "My First Flex App":

    <mx:Panel title="My First Flex App">
    </mx:Panel>